#include "updateCountry.h"
#include "ui_updatecountry.h"

updateCountry::updateCountry(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::updateCountry)
{
    ui->setupUi(this);
}

updateCountry::~updateCountry()
{
    delete ui;
}

QString updateCountry::getAlphaCode()
{
    return m_alphaCode;
}

QString updateCountry::getChiName()
{
    return m_chiName;
}

QString updateCountry::getEngName()
{
    return m_engName;
}

QString updateCountry::getTeamSize()
{
    return m_teamSize;
}

QString updateCountry::getGold()
{
    return m_gold;
}

QString updateCountry::getSilver()
{
    return m_silver;
}

QString updateCountry::getBronze()
{
    return m_bronze;
}

void updateCountry::setChiName(QString name)
{
    ui->lineEdit_2->setText(name);
}

void updateCountry::on_pushButton_clicked()
{
    m_alphaCode = ui->lineEdit->text();
    m_chiName = ui->lineEdit_2->text();
    m_engName = ui->lineEdit_4->text();
    m_teamSize = ui->lineEdit_3->text();
    m_gold = ui->lineEdit_5->text();
    m_silver = ui->lineEdit_6->text();
    m_bronze = ui->lineEdit_7->text();

    this->accept();
}

void updateCountry::on_pushButton_2_clicked()
{
    this->reject();
}
